-
Couldn't load subscription status.
- Fork 117
[ReactPHP] Add user-option for redacting query parameters #379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #379 +/- ##
=========================================
Coverage 82.61% 82.62%
- Complexity 1929 1930 +1
=========================================
Files 141 141
Lines 8063 8067 +4
=========================================
+ Hits 6661 6665 +4
Misses 1402 1402 Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Co-authored-by: Tobias Bachert <[email protected]>
Co-authored-by: Tobias Bachert <[email protected]>
|
I like the PR - Do you see yourself adding this as a util so instrumentations could share the behavior? |
I would be happy to! Currently, this would add a dependency to the API package ( opentelemetry-php-contrib/src/Instrumentation/ReactPHP/src/ReactPHPInstrumentation.php Line 278 in 30200ff
Since that package is licensed MIT, perhaps it is acceptable to add that one class to the OTel-PHP codebase? https://github.com/guzzle/psr7/blob/2.7/src/Query.php |
|
Somewhat related: I plan on adding support for env-based configuration of Example configuration provider: InstrumentationConfigurationHttp; the entire package could be moved to contrib once config support is added/moved to an API package |
|
@Nevay are you saying it would be redundant for me to extract my current implementation to a shared utility, and eventually you’ll have something committed that I could replace mine with? |
|
These checks should pass now with #371 merged. |
Related to the general issue tracked in open-telemetry/semantic-conventions#877
There have been related PRs for OpenTelemetry Semantic Conventions in an attempt to define this, but it seems they were too broad to gain consensus. However, I have not seen any comments contrary to the specific feature implemented by this PR, exemplified here:
and here:
Since that has not yet come to fruition, but these is still a need, I propose implementing this PR for at a minimum this PHP auto-instrumentation library, with the goal of aligning the mechanism with what SemConv decides in the future.
Note that this PR does not allow for overriding the required query keys defined in footnote 6 here: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/registry/attributes/url.md#url-query but allows the user of this library to add additional keys to the redaction list.
Slack conversation specifically for this PR: https://cloud-native.slack.com/archives/C01NFPCV44V/p1748367527296729